home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Carousel Volume 2 #1
/
carousel.iso
/
mactosh
/
hc
/
hyperps1.sit
/
HyperPS 1.2
/
card_3409.txt
< prev
next >
Wrap
Text File
|
1988-11-14
|
3KB
|
116 lines
-- card: 3409 from stack: in.2
-- bmap block id: 0
-- flags: 0000
-- background id: 2562
-- name:
-- part contents for background part 1
----- text -----
gsave initmatrix
%!PS-Adobe-1.0
%%Creator: Erik Reinecke
%%Title: PostScript Arrives
%%CreationDate:11/15/85
%%Pages:1
%%DocumentFonts: Helvetica-BoldOblique
%%Dimensions:0 0 612 792
%%EndComments
% Simulate a plane with log spaced lines. Expects these parameters:
% x dimension, y dimension, number of lines to horizon, width of
% first line and shade of gray for background.
/Horizon
{ /grayshade exch def % shade of gray
/firstline exch def % linewidth in foreground
/nlines exch def % number of lines in plain
/dy exch def % y dimension
/dx exch def % x dimension
newpath 0 0 moveto % draw plain in gray
0 dy rlineto
dx 0 rlineto
0 0 dy sub rlineto
closepath
grayshade setgray
fill
0 setgray % black lines
1 10 nlines div 10 % for loop (1 to 10)
{dup % save a copy of loopcounter
truncate firstline exch div % make line thinner as it recedes
setlinewidth
log dy mul % log(loopcounter) times y dimension
0 exch moveto
dx 0 rlineto
stroke % draw the line
} for
} def % end horizon
/PostScript
{/GrayValue exch def
/Fontsize exch def
/Helvetica-BoldOblique findfont Fontsize scalefont setfont
0 0 moveto
(PostScript) true charpath
gsave
GrayValue setgray fill
grestore
0.7 setlinewidth
stroke
} def
/IsHere
{/GrayValue exch def
/Fontsize exch def
/Helvetica-BoldOblique findfont Fontsize scalefont setfont
0 0 moveto
(is here!) true charpath
gsave
GrayValue setgray fill
grestore
0.7 setlinewidth
stroke
} def
/sphere % draw a 'sphere' by shading from
{ % white in the middle to black at
1 1 90 % the edges using cos function.
{ 0 0 2 index 0 360 arc % Circle using 0,0 as center and
% loop index as radius.
cos setgray % cos(loopindex) is used to setgray
stroke % draw it
} for % end for 1 to 90
} def % end sphere
306 391 translate
90 rotate
-406 -391 translate
gsave
150 580 translate
.5 .5 scale
sphere
grestore
gsave
792 450 50 5 .85 Horizon
grestore
250 250 translate
gsave
[1 0.3249 1 -1 0 0] concat % skew axes for shadow
50 0 PostScript
grestore
gsave
[1 0.3249 0 1 0 0] concat
50 .5 PostScript
grestore
300 -42 translate
27 1 IsHere
grestore